package org.base23.video.domain.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;

/**
 * 详细姿势分析结果实体
 */
public class DetailedPostureAnalysis {
    
    /**
     * 整体评估
     */
    @JsonProperty("overallAssessment")
    private OverallAssessment overallAssessment;
    
    /**
     * 动作阶段分解分析
     */
    @JsonProperty("movementPhases")
    private List<MovementPhase> movementPhases;
    
    /**
     * 关节细节分析
     */
    @JsonProperty("jointDetailAnalysis")
    private List<JointDetailAnalysis> jointDetailAnalysis;
    
    /**
     * 生物力学分析
     */
    @JsonProperty("biomechanicsAnalysis")
    private BiomechanicsAnalysis biomechanicsAnalysis;
    
    /**
     * 个性化指导建议
     */
    @JsonProperty("personalizedCoaching")
    private PersonalizedCoaching personalizedCoaching;
    
    /**
     * 训练计划建议
     */
    @JsonProperty("trainingPlan")
    private TrainingPlan trainingPlan;
    
    public DetailedPostureAnalysis() {}
    
    // Getters and Setters
    public OverallAssessment getOverallAssessment() {
        return overallAssessment;
    }
    
    public void setOverallAssessment(OverallAssessment overallAssessment) {
        this.overallAssessment = overallAssessment;
    }
    
    public List<MovementPhase> getMovementPhases() {
        return movementPhases;
    }
    
    public void setMovementPhases(List<MovementPhase> movementPhases) {
        this.movementPhases = movementPhases;
    }
    
    public List<JointDetailAnalysis> getJointDetailAnalysis() {
        return jointDetailAnalysis;
    }
    
    public void setJointDetailAnalysis(List<JointDetailAnalysis> jointDetailAnalysis) {
        this.jointDetailAnalysis = jointDetailAnalysis;
    }
    
    public BiomechanicsAnalysis getBiomechanicsAnalysis() {
        return biomechanicsAnalysis;
    }
    
    public void setBiomechanicsAnalysis(BiomechanicsAnalysis biomechanicsAnalysis) {
        this.biomechanicsAnalysis = biomechanicsAnalysis;
    }
    
    public PersonalizedCoaching getPersonalizedCoaching() {
        return personalizedCoaching;
    }
    
    public void setPersonalizedCoaching(PersonalizedCoaching personalizedCoaching) {
        this.personalizedCoaching = personalizedCoaching;
    }
    
    public TrainingPlan getTrainingPlan() {
        return trainingPlan;
    }
    
    public void setTrainingPlan(TrainingPlan trainingPlan) {
        this.trainingPlan = trainingPlan;
    }
    
    /**
     * 整体评估
     */
    public static class OverallAssessment {
        @JsonProperty("totalScore")
        private Double totalScore;
        
        @JsonProperty("grade")
        private String grade;
        
        @JsonProperty("strengthPoints")
        private List<String> strengthPoints;
        
        @JsonProperty("weaknessPoints")
        private List<String> weaknessPoints;
        
        @JsonProperty("injuryRiskLevel")
        private String injuryRiskLevel;
        
        @JsonProperty("efficiencyRating")
        private Double efficiencyRating;
        
        public OverallAssessment() {}
        
        public Double getTotalScore() { return totalScore; }
        public void setTotalScore(Double totalScore) { this.totalScore = totalScore; }
        public String getGrade() { return grade; }
        public void setGrade(String grade) { this.grade = grade; }
        public List<String> getStrengthPoints() { return strengthPoints; }
        public void setStrengthPoints(List<String> strengthPoints) { this.strengthPoints = strengthPoints; }
        public List<String> getWeaknessPoints() { return weaknessPoints; }
        public void setWeaknessPoints(List<String> weaknessPoints) { this.weaknessPoints = weaknessPoints; }
        public String getInjuryRiskLevel() { return injuryRiskLevel; }
        public void setInjuryRiskLevel(String injuryRiskLevel) { this.injuryRiskLevel = injuryRiskLevel; }
        public Double getEfficiencyRating() { return efficiencyRating; }
        public void setEfficiencyRating(Double efficiencyRating) { this.efficiencyRating = efficiencyRating; }
    }
    
    /**
     * 运动阶段分析
     */
    public static class MovementPhase {
        @JsonProperty("phaseName")
        private String phaseName;
        
        @JsonProperty("frameRange")
        private FrameRange frameRange;
        
        @JsonProperty("duration")
        private Double duration;
        
        @JsonProperty("keyActions")
        private List<KeyAction> keyActions;
        
        @JsonProperty("phaseScore")
        private Double phaseScore;
        
        @JsonProperty("criticalPoints")
        private List<String> criticalPoints;
        
        public MovementPhase() {}
        
        public String getPhaseName() { return phaseName; }
        public void setPhaseName(String phaseName) { this.phaseName = phaseName; }
        public FrameRange getFrameRange() { return frameRange; }
        public void setFrameRange(FrameRange frameRange) { this.frameRange = frameRange; }
        public Double getDuration() { return duration; }
        public void setDuration(Double duration) { this.duration = duration; }
        public List<KeyAction> getKeyActions() { return keyActions; }
        public void setKeyActions(List<KeyAction> keyActions) { this.keyActions = keyActions; }
        public Double getPhaseScore() { return phaseScore; }
        public void setPhaseScore(Double phaseScore) { this.phaseScore = phaseScore; }
        public List<String> getCriticalPoints() { return criticalPoints; }
        public void setCriticalPoints(List<String> criticalPoints) { this.criticalPoints = criticalPoints; }
    }
    
    /**
     * 关键动作
     */
    public static class KeyAction {
        @JsonProperty("actionName")
        private String actionName;
        
        @JsonProperty("timing")
        private Double timing;
        
        @JsonProperty("quality")
        private String quality;
        
        @JsonProperty("improvement")
        private String improvement;
        
        public KeyAction() {}
        
        public String getActionName() { return actionName; }
        public void setActionName(String actionName) { this.actionName = actionName; }
        public Double getTiming() { return timing; }
        public void setTiming(Double timing) { this.timing = timing; }
        public String getQuality() { return quality; }
        public void setQuality(String quality) { this.quality = quality; }
        public String getImprovement() { return improvement; }
        public void setImprovement(String improvement) { this.improvement = improvement; }
    }
    
    /**
     * 关节详细分析
     */
    public static class JointDetailAnalysis {
        @JsonProperty("jointName")
        private String jointName;
        
        @JsonProperty("angleProgression")
        private List<AnglePoint> angleProgression;
        
        @JsonProperty("optimalRange")
        private AngleRange optimalRange;
        
        @JsonProperty("currentPerformance")
        private JointPerformance currentPerformance;
        
        @JsonProperty("specificAdvice")
        private List<String> specificAdvice;
        
        public JointDetailAnalysis() {}
        
        public String getJointName() { return jointName; }
        public void setJointName(String jointName) { this.jointName = jointName; }
        public List<AnglePoint> getAngleProgression() { return angleProgression; }
        public void setAngleProgression(List<AnglePoint> angleProgression) { this.angleProgression = angleProgression; }
        public AngleRange getOptimalRange() { return optimalRange; }
        public void setOptimalRange(AngleRange optimalRange) { this.optimalRange = optimalRange; }
        public JointPerformance getCurrentPerformance() { return currentPerformance; }
        public void setCurrentPerformance(JointPerformance currentPerformance) { this.currentPerformance = currentPerformance; }
        public List<String> getSpecificAdvice() { return specificAdvice; }
        public void setSpecificAdvice(List<String> specificAdvice) { this.specificAdvice = specificAdvice; }
    }
    
    /**
     * 角度点（时间序列）
     */
    public static class AnglePoint {
        @JsonProperty("timestamp")
        private Double timestamp;
        
        @JsonProperty("angle")
        private Double angle;
        
        @JsonProperty("quality")
        private String quality;
        
        public AnglePoint() {}
        
        public Double getTimestamp() { return timestamp; }
        public void setTimestamp(Double timestamp) { this.timestamp = timestamp; }
        public Double getAngle() { return angle; }
        public void setAngle(Double angle) { this.angle = angle; }
        public String getQuality() { return quality; }
        public void setQuality(String quality) { this.quality = quality; }
    }
    
    /**
     * 关节表现评估
     */
    public static class JointPerformance {
        @JsonProperty("consistency")
        private Double consistency;
        
        @JsonProperty("smoothness")
        private Double smoothness;
        
        @JsonProperty("efficiency")
        private Double efficiency;
        
        @JsonProperty("riskFactor")
        private Double riskFactor;
        
        public JointPerformance() {}
        
        public Double getConsistency() { return consistency; }
        public void setConsistency(Double consistency) { this.consistency = consistency; }
        public Double getSmoothness() { return smoothness; }
        public void setSmoothness(Double smoothness) { this.smoothness = smoothness; }
        public Double getEfficiency() { return efficiency; }
        public void setEfficiency(Double efficiency) { this.efficiency = efficiency; }
        public Double getRiskFactor() { return riskFactor; }
        public void setRiskFactor(Double riskFactor) { this.riskFactor = riskFactor; }
    }
    
    /**
     * 生物力学分析
     */
    public static class BiomechanicsAnalysis {
        @JsonProperty("powerGeneration")
        private PowerAnalysis powerGeneration;
        
        @JsonProperty("energyEfficiency")
        private Double energyEfficiency;
        
        @JsonProperty("coordinationIndex")
        private Double coordinationIndex;
        
        @JsonProperty("balanceStability")
        private BalanceAnalysis balanceStability;
        
        @JsonProperty("forceDistribution")
        private Map<String, Double> forceDistribution;
        
        public BiomechanicsAnalysis() {}
        
        public PowerAnalysis getPowerGeneration() { return powerGeneration; }
        public void setPowerGeneration(PowerAnalysis powerGeneration) { this.powerGeneration = powerGeneration; }
        public Double getEnergyEfficiency() { return energyEfficiency; }
        public void setEnergyEfficiency(Double energyEfficiency) { this.energyEfficiency = energyEfficiency; }
        public Double getCoordinationIndex() { return coordinationIndex; }
        public void setCoordinationIndex(Double coordinationIndex) { this.coordinationIndex = coordinationIndex; }
        public BalanceAnalysis getBalanceStability() { return balanceStability; }
        public void setBalanceStability(BalanceAnalysis balanceStability) { this.balanceStability = balanceStability; }
        public Map<String, Double> getForceDistribution() { return forceDistribution; }
        public void setForceDistribution(Map<String, Double> forceDistribution) { this.forceDistribution = forceDistribution; }
    }
    
    /**
     * 力量分析
     */
    public static class PowerAnalysis {
        @JsonProperty("peakPower")
        private Double peakPower;
        
        @JsonProperty("averagePower")
        private Double averagePower;
        
        @JsonProperty("powerConsistency")
        private Double powerConsistency;
        
        @JsonProperty("powerPhases")
        private List<String> powerPhases;
        
        public PowerAnalysis() {}
        
        public Double getPeakPower() { return peakPower; }
        public void setPeakPower(Double peakPower) { this.peakPower = peakPower; }
        public Double getAveragePower() { return averagePower; }
        public void setAveragePower(Double averagePower) { this.averagePower = averagePower; }
        public Double getPowerConsistency() { return powerConsistency; }
        public void setPowerConsistency(Double powerConsistency) { this.powerConsistency = powerConsistency; }
        public List<String> getPowerPhases() { return powerPhases; }
        public void setPowerPhases(List<String> powerPhases) { this.powerPhases = powerPhases; }
    }
    
    /**
     * 平衡分析
     */
    public static class BalanceAnalysis {
        @JsonProperty("lateralStability")
        private Double lateralStability;
        
        @JsonProperty("anteriorPosteriorStability")
        private Double anteriorPosteriorStability;
        
        @JsonProperty("centerOfMassControl")
        private Double centerOfMassControl;
        
        public BalanceAnalysis() {}
        
        public Double getLateralStability() { return lateralStability; }
        public void setLateralStability(Double lateralStability) { this.lateralStability = lateralStability; }
        public Double getAnteriorPosteriorStability() { return anteriorPosteriorStability; }
        public void setAnteriorPosteriorStability(Double anteriorPosteriorStability) { this.anteriorPosteriorStability = anteriorPosteriorStability; }
        public Double getCenterOfMassControl() { return centerOfMassControl; }
        public void setCenterOfMassControl(Double centerOfMassControl) { this.centerOfMassControl = centerOfMassControl; }
    }
    
    /**
     * 个性化教练指导
     */
    public static class PersonalizedCoaching {
        @JsonProperty("immediateCorrections")
        private List<ImmediateCorrection> immediateCorrections;
        
        @JsonProperty("progressiveAdjustments")
        private List<ProgressiveAdjustment> progressiveAdjustments;
        
        @JsonProperty("drillRecommendations")
        private List<DrillRecommendation> drillRecommendations;
        
        @JsonProperty("focusAreas")
        private List<String> focusAreas;
        
        public PersonalizedCoaching() {}
        
        public List<ImmediateCorrection> getImmediateCorrections() { return immediateCorrections; }
        public void setImmediateCorrections(List<ImmediateCorrection> immediateCorrections) { this.immediateCorrections = immediateCorrections; }
        public List<ProgressiveAdjustment> getProgressiveAdjustments() { return progressiveAdjustments; }
        public void setProgressiveAdjustments(List<ProgressiveAdjustment> progressiveAdjustments) { this.progressiveAdjustments = progressiveAdjustments; }
        public List<DrillRecommendation> getDrillRecommendations() { return drillRecommendations; }
        public void setDrillRecommendations(List<DrillRecommendation> drillRecommendations) { this.drillRecommendations = drillRecommendations; }
        public List<String> getFocusAreas() { return focusAreas; }
        public void setFocusAreas(List<String> focusAreas) { this.focusAreas = focusAreas; }
    }
    
    /**
     * 即时纠正建议
     */
    public static class ImmediateCorrection {
        @JsonProperty("issue")
        private String issue;
        
        @JsonProperty("correction")
        private String correction;
        
        @JsonProperty("priority")
        private String priority;
        
        @JsonProperty("expectedImprovement")
        private String expectedImprovement;
        
        public ImmediateCorrection() {}
        
        public String getIssue() { return issue; }
        public void setIssue(String issue) { this.issue = issue; }
        public String getCorrection() { return correction; }
        public void setCorrection(String correction) { this.correction = correction; }
        public String getPriority() { return priority; }
        public void setPriority(String priority) { this.priority = priority; }
        public String getExpectedImprovement() { return expectedImprovement; }
        public void setExpectedImprovement(String expectedImprovement) { this.expectedImprovement = expectedImprovement; }
    }
    
    /**
     * 渐进式调整
     */
    public static class ProgressiveAdjustment {
        @JsonProperty("phase")
        private String phase;
        
        @JsonProperty("targetAngle")
        private Double targetAngle;
        
        @JsonProperty("currentAngle")
        private Double currentAngle;
        
        @JsonProperty("adjustmentSteps")
        private List<String> adjustmentSteps;
        
        @JsonProperty("timeframe")
        private String timeframe;
        
        public ProgressiveAdjustment() {}
        
        public String getPhase() { return phase; }
        public void setPhase(String phase) { this.phase = phase; }
        public Double getTargetAngle() { return targetAngle; }
        public void setTargetAngle(Double targetAngle) { this.targetAngle = targetAngle; }
        public Double getCurrentAngle() { return currentAngle; }
        public void setCurrentAngle(Double currentAngle) { this.currentAngle = currentAngle; }
        public List<String> getAdjustmentSteps() { return adjustmentSteps; }
        public void setAdjustmentSteps(List<String> adjustmentSteps) { this.adjustmentSteps = adjustmentSteps; }
        public String getTimeframe() { return timeframe; }
        public void setTimeframe(String timeframe) { this.timeframe = timeframe; }
    }
    
    /**
     * 训练建议
     */
    public static class DrillRecommendation {
        @JsonProperty("drillName")
        private String drillName;
        
        @JsonProperty("description")
        private String description;
        
        @JsonProperty("targetArea")
        private String targetArea;
        
        @JsonProperty("sets")
        private Integer sets;
        
        @JsonProperty("reps")
        private Integer reps;
        
        @JsonProperty("frequency")
        private String frequency;
        
        public DrillRecommendation() {}
        
        public String getDrillName() { return drillName; }
        public void setDrillName(String drillName) { this.drillName = drillName; }
        public String getDescription() { return description; }
        public void setDescription(String description) { this.description = description; }
        public String getTargetArea() { return targetArea; }
        public void setTargetArea(String targetArea) { this.targetArea = targetArea; }
        public Integer getSets() { return sets; }
        public void setSets(Integer sets) { this.sets = sets; }
        public Integer getReps() { return reps; }
        public void setReps(Integer reps) { this.reps = reps; }
        public String getFrequency() { return frequency; }
        public void setFrequency(String frequency) { this.frequency = frequency; }
    }
    
    /**
     * 训练计划
     */
    public static class TrainingPlan {
        @JsonProperty("shortTermGoals")
        private List<String> shortTermGoals;
        
        @JsonProperty("longTermGoals")
        private List<String> longTermGoals;
        
        @JsonProperty("weeklySchedule")
        private Map<String, List<String>> weeklySchedule;
        
        @JsonProperty("progressMetrics")
        private List<String> progressMetrics;
        
        public TrainingPlan() {}
        
        public List<String> getShortTermGoals() { return shortTermGoals; }
        public void setShortTermGoals(List<String> shortTermGoals) { this.shortTermGoals = shortTermGoals; }
        public List<String> getLongTermGoals() { return longTermGoals; }
        public void setLongTermGoals(List<String> longTermGoals) { this.longTermGoals = longTermGoals; }
        public Map<String, List<String>> getWeeklySchedule() { return weeklySchedule; }
        public void setWeeklySchedule(Map<String, List<String>> weeklySchedule) { this.weeklySchedule = weeklySchedule; }
        public List<String> getProgressMetrics() { return progressMetrics; }
        public void setProgressMetrics(List<String> progressMetrics) { this.progressMetrics = progressMetrics; }
    }
    
    /**
     * 帧范围
     */
    public static class FrameRange {
        @JsonProperty("startFrame")
        private Integer startFrame;
        
        @JsonProperty("endFrame")
        private Integer endFrame;
        
        public FrameRange() {}
        
        public Integer getStartFrame() { return startFrame; }
        public void setStartFrame(Integer startFrame) { this.startFrame = startFrame; }
        public Integer getEndFrame() { return endFrame; }
        public void setEndFrame(Integer endFrame) { this.endFrame = endFrame; }
    }
    
    /**
     * 角度范围
     */
    public static class AngleRange {
        @JsonProperty("optimal")
        private Double optimal;
        
        @JsonProperty("acceptable")
        private Double[] acceptable;
        
        @JsonProperty("warning")
        private Double[] warning;
        
        @JsonProperty("danger")
        private Double[] danger;
        
        public AngleRange() {}
        
        public Double getOptimal() { return optimal; }
        public void setOptimal(Double optimal) { this.optimal = optimal; }
        public Double[] getAcceptable() { return acceptable; }
        public void setAcceptable(Double[] acceptable) { this.acceptable = acceptable; }
        public Double[] getWarning() { return warning; }
        public void setWarning(Double[] warning) { this.warning = warning; }
        public Double[] getDanger() { return danger; }
        public void setDanger(Double[] danger) { this.danger = danger; }
    }
} 